Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 5 - Menu Manager Reference / Menu Manager Resources


The Extended Menu Resource

NEW WITH THE APPEARANCE MANAGER

After reading in a 'MENU' resource, GetMenu looks for an extended menu resource of type 'xmnu' with the same resource ID. The extended menu resource allows you to create menus with modifier key keyboard glyphs and icons attached to menu items and Appearance-compliant menu backgrounds. The information is set for specified menu items (it is not necessary to create an extended menu entry for each item). At this point, the information can be purged or released. Figure 5-3 shows the format of a compiled 'xmnu' resource.


Figure 5-3 Structure of a compiled extended menu ('xmnu') resource

A compiled version of an 'xmnu' resource contains the following elements:

Figure 5-4 shows the format of an extended menu item entry.


Figure 5-4 Structure of an extended menu item entry

Each entry in a 'xmnu' resource corresponds to a menu item and contains the following:


Table 5-1 Keyboard font character codes
Character codeDescription
0x00Null (always glyph 1)
0x01Unassigned (reserved for 2 bytes)
0x02Tab to the right key (for left-to-right script systems)
0x03Tab to the left key (for right-to-left script systems)
0x04Enter key
0x05Shift key
0x06Control key
0x07Option key
0x08Null (always glyph 1)
0x09Space (always glyph 3) key
0x0ADelete to the right key (for right-to-left script systems)
0x0BReturn key (for left-to-right script systems)
0x0CReturn key (for right-to-left script systems)
0x0DNonmarking return key
0x0EUnassigned
0x0FPencil key
0x10Downward dashed arrow key
0x11Command key
0x12Checkmark key
0x13Diamond key
0x14Apple logo key (filled)
0x15Unassigned (paragraph in Korean)
0x16Unassigned
0x17Delete to the left key (for left-to-right script systems)
0x18Leftward dashed arrow key
0x19Upward dashed arrow key
0x1ARightward dashed arrow key
0x1BEscape key
0x1CClear key
0x1DUnassigned (left double quotes in Japanese)
0x1EUnassigned (right double quotes in Japanese)
0x1FUnassigned (trademark in Japanese)
0x61Blank key
0x62Page up key
0x63Caps lock key
0x64Left arrow key
0x65Right arrow key
0x66Northwest arrow key
0x67Help key
0x68Up arrow key
0x69Southeast arrow key
0x6ADown arrow key
0x6BPage down key
0x6CApple logo key (outline)
0x6DContextual menu key
0x6EPower key
0x6FF1 key
0x70F2 key
0x71F3 key
0x72F4 key
0x73F5 key
0x74F6 key
0x75F7 key
0x76F8 key
0x77F9 key
0x78F10 key
0x79F11 key
0x7AF12 key
0x87F13 key
0x88F14 key
0x89F15 key
0x8AControl key (ISO standard)


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998